package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * IeFuenteDoc generated by hbm2java
 */
@Entity
@Table(name = "IE_FUENTE_DOC", schema = "UPET")
@SequenceGenerator(name="SEQ_IE_FUENTE_DOC" , sequenceName="SEQ_IE_FUENTE_DOC")
public class IeFuenteDoc implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4330707193957670681L;
	private Long iefuenteDoc;
	private IeFuenteDet ieFuenteDet;
	private TbDefinicionDocExo tbDefinicionDocExo;
	private String cusuario;
	private Date fhingreso;

	public IeFuenteDoc() {
	}

	public IeFuenteDoc(Long iefuenteDoc) {
		this.iefuenteDoc = iefuenteDoc;
	}

	public IeFuenteDoc(Long iefuenteDoc, IeFuenteDet ieFuenteDet,
			TbDefinicionDocExo tbDefinicionDocExo, String cusuario,
			Date fhingreso) {
		this.iefuenteDoc = iefuenteDoc;
		this.ieFuenteDet = ieFuenteDet;
		this.tbDefinicionDocExo = tbDefinicionDocExo;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
	}

	@Id
	@Column(name = "IE_FUENTE_DOC", unique = true, nullable = false, precision = 10, scale = 0)
	@GeneratedValue(strategy=GenerationType.AUTO, generator="SEQ_IE_FUENTE_DOC")
	public Long getIefuenteDoc() {
		return this.iefuenteDoc;
	}

	public void setIefuenteDoc(Long iefuenteDoc) {
		this.iefuenteDoc = iefuenteDoc;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "I_FUENTE_DET")
	public IeFuenteDet getIeFuenteDet() {
		return this.ieFuenteDet;
	}

	public void setIeFuenteDet(IeFuenteDet ieFuenteDet) {
		this.ieFuenteDet = ieFuenteDet;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_TIPO_DOC")
	public TbDefinicionDocExo getTbDefinicionDocExo() {
		return this.tbDefinicionDocExo;
	}

	public void setTbDefinicionDocExo(TbDefinicionDocExo tbDefinicionDocExo) {
		this.tbDefinicionDocExo = tbDefinicionDocExo;
	}

	@Column(name = "C_USUARIO", length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

}
